package com.naihe.anderson.sms.entity;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import android.text.TextUtils;

public class SignatureMsg implements Serializable ,Comparable<SignatureMsg>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4579843759843792374L;
	
	public static final int SIGNATUREMSG_STATUT_SEND = 1;
	public static final int SIGNATUREMSG_STATUT_COMPLETE = -1;
	public static final int SIGNATUREMSG_STATUT_FAILED = 0;
	

	private long signatureMsgId;
	private String contactNumbers;
	private long signatureMsgTime;
	private int signatureMsgStatut;
	private String bodyMsg;
	
	@Override
	public int compareTo(SignatureMsg another) {
		if(getSignatureMsgStatut() > another.getSignatureMsgStatut())
			return 1;
		return -1;
	}

	public long getSignatureMsgId() {
		return signatureMsgId;
	}

	public void setSignatureMsgId(long signatureMsgId) {
		this.signatureMsgId = signatureMsgId;
	}

	public long getSignatureMsgTime() {
		return signatureMsgTime;
	}

	public void setSignatureMsgTime(long signatureMsgTime) {
		this.signatureMsgTime = signatureMsgTime;
	}

	public int getSignatureMsgStatut() {
		return signatureMsgStatut;
	}

	public void setSignatureMsgStatut(int signatureMsgStatut) {
		this.signatureMsgStatut = signatureMsgStatut;
	}

	public void setContactNumbers(String contactNumbers) {
		this.contactNumbers = contactNumbers;
	}
	
	public List<String> getContactNumbers(){
		if(TextUtils.isEmpty(contactNumbers))
			return null;
		
		String [] numbers = contactNumbers.split(";");
		return Arrays.asList(numbers);
	}
	
	public String getContactNumbersForSave(){
		return contactNumbers;
	}

	public String getBodyMsg() {
		return bodyMsg;
	}

	public void setBodyMsg(String bodyMsg) {
		this.bodyMsg = bodyMsg;
	}

}
